
package lanqiao;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.LinkedList;
import java.util.Queue;

public class Q0602 {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = "";
		int[][] dir = { { 1, 0 }, { 0, -1 }, { 0, 1 }, { -1, 0 } };
		String[] dirS = { "D", "L", "R", "U" };

		int m = 30;
		int n = 50;

//		int m = 4;
//		int n = 6;

		boolean[][] st = new boolean[m][n];

		for (int i = 0; i < m; i++) {
			line = br.readLine();
			for (int j = 0; j < n; j++) {
				if (line.charAt(j) == '1') {
					st[i][j] = true;
				}
			}
		}

//		for (int i = 0; i < st.length; i++) {
//			System.out.println(Arrays.toString(st[i]));
//		}

		String res = "-1";
		Queue<String[]> q = new LinkedList<>();
		q.add(new String[] { "0", "0", "" });
		st[0][0] = true;
		while (!q.isEmpty()) {
			String[] point = q.poll();
			int x = Integer.parseInt(point[0]);
			int y = Integer.parseInt(point[1]);
			String path = point[2];

			if (x == m - 1 && y == n - 1) {
				res = path;
				break;
			}

			for (int i = 0; i < 4; i++) {
				int xx = x + dir[i][0];
				int yy = y + dir[i][1];
				String ppath = path + dirS[i];
				if (xx >= 0 && xx < m && yy >= 0 && yy < n && !st[xx][yy]) {
					q.add(new String[] { String.valueOf(xx), String.valueOf(yy), ppath });
					st[xx][yy] = true;
				}
			}
		}
		System.out.println(res);
	}
}
